package com.gaofeng.day11;

import java.util.Random;
import java.util.Scanner;

/**
 * @author gaofeng
 * @date 2024-12-22 - 12:45
 */
public class demo02 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Random random = new Random();
        int[] arr1 = new int[10];

        for (int i = 0; i < 10; i++) {
            int number = random.nextInt(100) + 1;
            arr1[i] = number;
        }
        int sum = 0;
        for (int i = 0; i < arr1.length; i++) {
//            System.out.println(arr1[i]);
            sum += arr1[i];
        }
        System.out.println(sum);

        int avg = sum / arr1.length;
        System.out.println(avg);

        int count =0;

        for (int i = 0; i < arr1.length; i++) {
            if(arr1[i] < avg){
                count++;
            }
        }
        System.out.println(count);
    }
}
